package ceha.application;

import ceha.util.BackupMysql;
import ceha.util.Mysql;

import ceha.util.SystemTrayCde;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.beans.Beans;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.persistence.RollbackException;
import javax.swing.JFileChooser;
import javax.swing.JInternalFrame;
import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

public class CEHAMain extends javax.swing.JFrame {

    private boolean login;
    private boolean loginadmin;
    private boolean fixer;
    private int largeur;
    private int hauteur;

    public JTextField getRepvignette() {
        return repvignette;
    }

    public String getMysqlField() {
        return MysqlField.getText();
    }

    public CEHAMain() throws IOException, SQLException {

        //Tray icon
        new SystemTrayCde(this);
        initComponents();
        //test connection // attention apres initComponents
        new Mysql(this).Connect();
       
        try {
            UIManager.setLookAndFeel("WindowsLookAndFeel");
        } catch (InstantiationException e) {
        } catch (ClassNotFoundException e) {
        } catch (UnsupportedLookAndFeelException e) {
        } catch (IllegalAccessException e) {
        }

        if (checkAuto.isEnabled()) {
            pseudoField.setText(pseudoAuto.getText());
            passField.setText(passAuto.getText());
        }
        if (!Beans.isDesignTime()) {
            entityManager.getTransaction().begin();
        }
        int bord = 300;
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        largeur = screenSize.width - bord * 2;
        hauteur = screenSize.height - bord * 2;
        setBounds(bord, bord, largeur, hauteur);

        loginJIF.setLocation(300, 10);
        consultfichesJIF.setLocation(0, 10);
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("BDDCEHAPU").createEntityManager();
        query = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery("SELECT f FROM Fiche f");
        list = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(query.getResultList());
        desktop = new javax.swing.JDesktopPane();
        loginJIF = new javax.swing.JInternalFrame();
        loginPanel = new javax.swing.JPanel();
        passField = new javax.swing.JPasswordField();
        pseudoLabel = new javax.swing.JLabel();
        pseudoField = new javax.swing.JTextField();
        logoutButton = new javax.swing.JButton();
        passLabel = new javax.swing.JLabel();
        loginButton = new javax.swing.JButton();
        logoLabel = new javax.swing.JLabel();
        bienvenueLabel = new javax.swing.JLabel();
        adminJIF = new javax.swing.JInternalFrame();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        optionsPanel = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        repvignette = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        droitsButton = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        pseudoAuto = new javax.swing.JTextField();
        passAuto = new javax.swing.JPasswordField();
        jLabel7 = new javax.swing.JLabel();
        checkAuto = new javax.swing.JCheckBox();
        MysqlField = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        lancerButton1 = new javax.swing.JButton();
        nomsave1 = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        dossiersave1 = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        parcourirButton = new javax.swing.JButton();
        consultfichesJIF = new javax.swing.JInternalFrame();
        consultPanel = new javax.swing.JPanel();
        consultButton = new javax.swing.JButton();
        actionJIF = new javax.swing.JInternalFrame();
        createPanel1 = new javax.swing.JPanel();
        adminButton = new javax.swing.JButton();
        creerficheButton = new javax.swing.JButton();
        controleValideButton = new javax.swing.JButton();
        menubar1 = new javax.swing.JMenuBar();
        mainmenu = new javax.swing.JMenu();
        quitte = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("BDD  DU  CEHA");
        setBackground(new java.awt.Color(255, 255, 255));
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setResizable(false);

        desktop.setBackground(new java.awt.Color(247, 255, 247));
        desktop.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(102, 102, 0), 3, true));
        desktop.setForeground(new java.awt.Color(255, 255, 255));
        desktop.setDragMode(javax.swing.JDesktopPane.OUTLINE_DRAG_MODE);

        org.jdesktop.swingx.border.DropShadowBorder dropShadowBorder1 = new org.jdesktop.swingx.border.DropShadowBorder();
        dropShadowBorder1.setShadowColor(new java.awt.Color(255, 255, 204));
        loginJIF.setBorder(dropShadowBorder1);
        loginJIF.setIconifiable(true);
        loginJIF.setTitle("LOGIN");
        loginJIF.setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/ceha/ressource/petitlogoCEHA.jpg"))); // NOI18N
        loginJIF.setOpaque(true);
        loginJIF.setVisible(true);

        loginPanel.setBackground(new java.awt.Color(255, 255, 255));
        loginPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(new java.awt.Color(255, 255, 153), new java.awt.Color(102, 102, 102)));

        passField.setBackground(new java.awt.Color(255, 255, 204));
        passField.setFont(new java.awt.Font("Arial", 1, 12));
        passField.setToolTipText("laissez les champs vides pour une simple recherche");
        passField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED, new java.awt.Color(51, 51, 255), new java.awt.Color(204, 255, 255), null, null));

        pseudoLabel.setBackground(new java.awt.Color(0, 0, 0));
        pseudoLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        pseudoLabel.setForeground(new java.awt.Color(255, 255, 255));
        pseudoLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        pseudoLabel.setText("Pseudo ");
        pseudoLabel.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        pseudoLabel.setOpaque(true);

        pseudoField.setBackground(new java.awt.Color(255, 255, 204));
        pseudoField.setFont(new java.awt.Font("Arial", 1, 12));
        pseudoField.setToolTipText("");
        pseudoField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED, new java.awt.Color(51, 102, 255), new java.awt.Color(204, 255, 255), null, null));

        logoutButton.setBackground(new java.awt.Color(255, 255, 255));
        logoutButton.setFont(new java.awt.Font("Times New Roman", 1, 14));
        logoutButton.setText("LOGOUT");
        logoutButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                logoutA(evt);
            }
        });

        passLabel.setBackground(new java.awt.Color(0, 0, 0));
        passLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        passLabel.setForeground(new java.awt.Color(255, 255, 255));
        passLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        passLabel.setText("Mot de passe");
        passLabel.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        passLabel.setOpaque(true);

        loginButton.setBackground(new java.awt.Color(255, 255, 204));
        loginButton.setFont(new java.awt.Font("Times New Roman", 1, 14));
        loginButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ceha/ressource/login.jpg"))); // NOI18N
        loginButton.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 102), 5, true), "Login", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Times New Roman", 1, 18), new java.awt.Color(0, 102, 102))); // NOI18N
        loginButton.setContentAreaFilled(false);
        loginButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                loginA(evt);
            }
        });

        logoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ceha/ressource/logoCEHA.jpg"))); // NOI18N

        bienvenueLabel.setFont(new java.awt.Font("Palatino Linotype", 3, 18));
        bienvenueLabel.setForeground(new java.awt.Color(255, 255, 255));
        bienvenueLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        bienvenueLabel.setText("BIENVENUE !");
        bienvenueLabel.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));

        javax.swing.GroupLayout loginPanelLayout = new javax.swing.GroupLayout(loginPanel);
        loginPanel.setLayout(loginPanelLayout);
        loginPanelLayout.setHorizontalGroup(
            loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(loginPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(loginPanelLayout.createSequentialGroup()
                        .addGroup(loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, loginPanelLayout.createSequentialGroup()
                                .addGroup(loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(passLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)
                                    .addComponent(pseudoLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(pseudoField)
                                    .addComponent(passField, javax.swing.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE)))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, loginPanelLayout.createSequentialGroup()
                                .addComponent(logoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(loginButton, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, loginPanelLayout.createSequentialGroup()
                        .addComponent(logoutButton, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(67, 67, 67))
                    .addGroup(loginPanelLayout.createSequentialGroup()
                        .addComponent(bienvenueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
                        .addContainerGap())))
        );
        loginPanelLayout.setVerticalGroup(
            loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(loginPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(pseudoLabel)
                    .addComponent(pseudoField, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(passField)
                    .addComponent(passLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(logoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(loginButton))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(logoutButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(bienvenueLabel)
                .addGap(66, 66, 66))
        );

        loginJIF.getContentPane().add(loginPanel, java.awt.BorderLayout.CENTER);

        loginJIF.setBounds(300, 10, 280, 290);
        desktop.add(loginJIF, javax.swing.JLayeredPane.DEFAULT_LAYER);

        adminJIF.setBackground(new java.awt.Color(222, 228, 170));
        adminJIF.setBorder(new org.jdesktop.swingx.border.DropShadowBorder());
        adminJIF.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        adminJIF.setIconifiable(true);
        adminJIF.setTitle("ADMINISTRATION");
        adminJIF.setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/ceha/ressource/petitlogoCEHA.jpg"))); // NOI18N

        jTabbedPane1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        org.jdesktop.swingx.border.DropShadowBorder dropShadowBorder2 = new org.jdesktop.swingx.border.DropShadowBorder();
        dropShadowBorder2.setShadowColor(new java.awt.Color(255, 255, 204));
        optionsPanel.setBorder(dropShadowBorder2);
        optionsPanel.setFont(new java.awt.Font("Tahoma", 1, 11));

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel1.setForeground(new java.awt.Color(153, 0, 0));
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Répertoire des vignettes");

        repvignette.setBackground(new java.awt.Color(255, 255, 204));
        repvignette.setFont(new java.awt.Font("Tahoma", 1, 14));
        repvignette.setText("C:\\Documents and Settings\\Gilles\\ImageCeha");

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel2.setForeground(new java.awt.Color(153, 0, 0));
        jLabel2.setText("Droits des membres");

        droitsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ceha/ressource/gestion-droits.gif"))); // NOI18N
        droitsButton.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        droitsButton.setContentAreaFilled(false);
        droitsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                droitsButton(evt);
            }
        });

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel5.setForeground(new java.awt.Color(153, 0, 0));
        jLabel5.setText("Login automatique");

        jLabel6.setBackground(new java.awt.Color(0, 0, 0));
        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel6.setText("Pseudo ");
        jLabel6.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jLabel6.setOpaque(true);

        pseudoAuto.setBackground(new java.awt.Color(255, 255, 204));
        pseudoAuto.setFont(new java.awt.Font("Arial", 1, 12));
        pseudoAuto.setText("ceha");
        pseudoAuto.setToolTipText("");
        pseudoAuto.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED, new java.awt.Color(51, 102, 255), new java.awt.Color(204, 255, 255), null, null));

        passAuto.setBackground(new java.awt.Color(255, 255, 204));
        passAuto.setFont(new java.awt.Font("Arial", 1, 12));
        passAuto.setText("ceha");
        passAuto.setToolTipText("laissez les champs vides pour une simple recherche");
        passAuto.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED, new java.awt.Color(51, 51, 255), new java.awt.Color(204, 255, 255), null, null));

        jLabel7.setBackground(new java.awt.Color(0, 0, 0));
        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel7.setForeground(new java.awt.Color(255, 255, 255));
        jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel7.setText("Mot de passe");
        jLabel7.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jLabel7.setOpaque(true);

        checkAuto.setFont(new java.awt.Font("Tahoma", 1, 11));
        checkAuto.setSelected(true);
        checkAuto.setText("activer");

        MysqlField.setBackground(new java.awt.Color(255, 255, 204));
        MysqlField.setFont(new java.awt.Font("Tahoma", 1, 14));
        MysqlField.setText("C:\\\\wamp\\\\wampmanager.exe");

        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel8.setForeground(new java.awt.Color(153, 0, 0));
        jLabel8.setText("Gestionnaire serveur MySql");

        lancerButton1.setFont(new java.awt.Font("Times New Roman", 1, 14));
        lancerButton1.setForeground(new java.awt.Color(153, 0, 0));
        lancerButton1.setText("Lancer la sauvegarde");
        lancerButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                lancerButton1backupButton(evt);
            }
        });

        nomsave1.setFont(new java.awt.Font("Times New Roman", 1, 14));

        jLabel9.setFont(new java.awt.Font("Times New Roman", 1, 14));
        jLabel9.setForeground(new java.awt.Color(153, 0, 0));
        jLabel9.setText("Nom de la sauvegarde");

        dossiersave1.setFont(new java.awt.Font("Times New Roman", 1, 14));

        jLabel10.setFont(new java.awt.Font("Times New Roman", 1, 14));
        jLabel10.setForeground(new java.awt.Color(153, 0, 0));
        jLabel10.setText("Dossier de souvegarde (éventuellement externe)");

        parcourirButton.setFont(new java.awt.Font("Times New Roman", 1, 14));
        parcourirButton.setText("Choisir");
        parcourirButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                choixRepA(evt);
            }
        });

        javax.swing.GroupLayout optionsPanelLayout = new javax.swing.GroupLayout(optionsPanel);
        optionsPanel.setLayout(optionsPanelLayout);
        optionsPanelLayout.setHorizontalGroup(
            optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(optionsPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(checkAuto)
                    .addComponent(jLabel1)
                    .addComponent(jLabel8)
                    .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(MysqlField, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(repvignette, javax.swing.GroupLayout.Alignment.LEADING))
                    .addGroup(optionsPanelLayout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 211, Short.MAX_VALUE))
                    .addGroup(optionsPanelLayout.createSequentialGroup()
                        .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE)
                            .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pseudoAuto, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)
                            .addComponent(passAuto, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE))
                        .addGap(284, 284, 284)))
                .addGap(21, 21, 21))
            .addGroup(optionsPanelLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lancerButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10)
                    .addComponent(jLabel9)
                    .addGroup(optionsPanelLayout.createSequentialGroup()
                        .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(dossiersave1)
                            .addComponent(nomsave1, javax.swing.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(parcourirButton, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(optionsPanelLayout.createSequentialGroup()
                                .addGap(16, 16, 16)
                                .addComponent(droitsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addGap(110, 110, 110))
        );
        optionsPanelLayout.setVerticalGroup(
            optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(optionsPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(repvignette, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(MysqlField, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(optionsPanelLayout.createSequentialGroup()
                        .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(jLabel2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(checkAuto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(pseudoAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(passAuto)
                            .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 21, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, optionsPanelLayout.createSequentialGroup()
                        .addComponent(droitsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(31, 31, 31)))
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(dossiersave1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(parcourirButton, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel9)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(nomsave1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(lancerButton1)
                .addGap(29, 29, 29))
        );

        jTabbedPane1.addTab("Options générales", optionsPanel);

        javax.swing.GroupLayout adminJIFLayout = new javax.swing.GroupLayout(adminJIF.getContentPane());
        adminJIF.getContentPane().setLayout(adminJIFLayout);
        adminJIFLayout.setHorizontalGroup(
            adminJIFLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(adminJIFLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 480, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(86, Short.MAX_VALUE))
        );
        adminJIFLayout.setVerticalGroup(
            adminJIFLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(adminJIFLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 458, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        adminJIF.setBounds(520, 190, 530, 490);
        desktop.add(adminJIF, javax.swing.JLayeredPane.DEFAULT_LAYER);

        org.jdesktop.swingx.border.DropShadowBorder dropShadowBorder3 = new org.jdesktop.swingx.border.DropShadowBorder();
        dropShadowBorder3.setShadowColor(new java.awt.Color(255, 255, 204));
        dropShadowBorder3.setShadowOpacity(1.0F);
        consultfichesJIF.setBorder(dropShadowBorder3);
        consultfichesJIF.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        consultfichesJIF.setForeground(new java.awt.Color(255, 252, 219));
        consultfichesJIF.setIconifiable(true);
        consultfichesJIF.setTitle("CONSULTATION");
        consultfichesJIF.setToolTipText("NB: Création de fiches impossible");
        consultfichesJIF.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        consultfichesJIF.setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/ceha/ressource/petitlogoCEHA.jpg"))); // NOI18N
        consultfichesJIF.setOpaque(true);
        consultfichesJIF.setVisible(true);

        consultPanel.setBackground(new java.awt.Color(255, 255, 255));
        consultPanel.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 204, 0), new java.awt.Color(255, 255, 204), new java.awt.Color(102, 102, 102), new java.awt.Color(255, 255, 255)));

        consultButton.setFont(new java.awt.Font("Times New Roman", 3, 14));
        consultButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ceha/ressource/consultation.gif"))); // NOI18N
        consultButton.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 51, 255), 5, true), "Consulter les fiches", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Times New Roman", 3, 18), new java.awt.Color(0, 0, 0))); // NOI18N
        consultButton.setContentAreaFilled(false);
        consultButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/ceha/ressource/40px-Light_green_check.svg.png"))); // NOI18N
        consultButton.setFocusable(false);
        consultButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        consultButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        consultButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                consultA(evt);
            }
        });

        javax.swing.GroupLayout consultPanelLayout = new javax.swing.GroupLayout(consultPanel);
        consultPanel.setLayout(consultPanelLayout);
        consultPanelLayout.setHorizontalGroup(
            consultPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(consultPanelLayout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addComponent(consultButton, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(33, Short.MAX_VALUE))
        );
        consultPanelLayout.setVerticalGroup(
            consultPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(consultPanelLayout.createSequentialGroup()
                .addComponent(consultButton, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)
                .addContainerGap())
        );

        consultfichesJIF.getContentPane().add(consultPanel, java.awt.BorderLayout.CENTER);

        consultfichesJIF.setBounds(20, 20, 250, 140);
        desktop.add(consultfichesJIF, javax.swing.JLayeredPane.DEFAULT_LAYER);

        actionJIF.setBackground(new java.awt.Color(232, 238, 211));
        org.jdesktop.swingx.border.DropShadowBorder dropShadowBorder4 = new org.jdesktop.swingx.border.DropShadowBorder();
        dropShadowBorder4.setShadowColor(new java.awt.Color(255, 255, 204));
        actionJIF.setBorder(dropShadowBorder4);
        actionJIF.setIconifiable(true);
        actionJIF.setTitle("ACCES ADMIN - CREATION DE FICHES");
        actionJIF.setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/ceha/ressource/petitlogoCEHA.jpg"))); // NOI18N

        createPanel1.setBackground(new java.awt.Color(255, 255, 255));
        createPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 204, 0), new java.awt.Color(255, 255, 204), new java.awt.Color(102, 102, 102), new java.awt.Color(255, 255, 255)));
        createPanel1.setForeground(new java.awt.Color(255, 255, 255));

        adminButton.setFont(new java.awt.Font("Times New Roman", 3, 18));
        adminButton.setText("Administrer");
        adminButton.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 0, 0), 5, true));
        adminButton.setContentAreaFilled(false);
        adminButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                adminA(evt);
            }
        });

        creerficheButton.setFont(new java.awt.Font("Tahoma", 1, 12));
        creerficheButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ceha/ressource/fiche.jpg"))); // NOI18N
        creerficheButton.setToolTipText("N'entrez rien pour une simple recherche dans la base");
        creerficheButton.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 102, 0), 5, true), "Créer des fiches", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Times New Roman", 1, 18), new java.awt.Color(0, 0, 0))); // NOI18N
        creerficheButton.setContentAreaFilled(false);
        creerficheButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                creerficheA(evt);
            }
        });

        controleValideButton.setFont(new java.awt.Font("Times New Roman", 3, 18));
        controleValideButton.setText("Contrôler et Valider");
        controleValideButton.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 5, true));
        controleValideButton.setContentAreaFilled(false);
        controleValideButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                controleValideA(evt);
            }
        });

        javax.swing.GroupLayout createPanel1Layout = new javax.swing.GroupLayout(createPanel1);
        createPanel1.setLayout(createPanel1Layout);
        createPanel1Layout.setHorizontalGroup(
            createPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(createPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(createPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(creerficheButton, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE)
                    .addComponent(adminButton, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE)
                    .addComponent(controleValideButton, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE))
                .addContainerGap())
        );
        createPanel1Layout.setVerticalGroup(
            createPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(createPanel1Layout.createSequentialGroup()
                .addComponent(creerficheButton)
                .addGap(18, 18, 18)
                .addComponent(adminButton)
                .addGap(18, 18, 18)
                .addComponent(controleValideButton)
                .addContainerGap(30, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout actionJIFLayout = new javax.swing.GroupLayout(actionJIF.getContentPane());
        actionJIF.getContentPane().setLayout(actionJIFLayout);
        actionJIFLayout.setHorizontalGroup(
            actionJIFLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 245, Short.MAX_VALUE)
            .addGroup(actionJIFLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(createPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        actionJIFLayout.setVerticalGroup(
            actionJIFLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 215, Short.MAX_VALUE)
            .addGroup(actionJIFLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(actionJIFLayout.createSequentialGroup()
                    .addGap(2, 2, 2)
                    .addComponent(createPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        actionJIF.setBounds(60, 370, 250, 250);
        desktop.add(actionJIF, javax.swing.JLayeredPane.DEFAULT_LAYER);

        menubar1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        menubar1.setFont(new java.awt.Font("Times New Roman", 1, 14));

        mainmenu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ceha/ressource/petitlogoCEHA.jpg"))); // NOI18N
        mainmenu.setText("CEHA");
        mainmenu.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        quitte.setText("Quitter");
        quitte.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                quitterA(evt);
            }
        });
        mainmenu.add(quitte);

        menubar1.add(mainmenu);

        setJMenuBar(menubar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(desktop, javax.swing.GroupLayout.DEFAULT_SIZE, 862, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(desktop, javax.swing.GroupLayout.DEFAULT_SIZE, 325, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void quitterA(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_quitterA
        System.exit(0);
    }//GEN-LAST:event_quitterA

    private void logoutA(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logoutA
        login = false;
        pseudoField.setText("");
        passField.setText("");
        pseudoField.setBackground(new Color(255, 255, 204));
        passField.setBackground(new Color(255, 255, 204));
        actionJIF.dispose();
//        actionJInternalFrame.getCreationFichesWin().dispose();
}//GEN-LAST:event_logoutA

    private void loginA(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginA
        String nom = pseudoField.getText();
        String mot = passField.getText();
        Connection conn = null;
        try {
            conn = new Mysql(this).Connect();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
        Statement stmt;
        ResultSet res = null;
        List<String> Lpseudo = new ArrayList<String>();
        List<String> Lpass = new ArrayList<String>();
        //obsolète :        List<String> Lrole = new ArrayList<String>();
        List<Boolean> Lconsult = new ArrayList<Boolean>();
        List<Boolean> Lindex = new ArrayList<Boolean>();
        List<Boolean> Lvalid = new ArrayList<Boolean>();
        List<Boolean> Ladmin = new ArrayList<Boolean>();
        try {
            stmt = conn.createStatement();
            res = stmt.executeQuery("SELECT * FROM membre");
            while (res.next()) {
                Lpseudo.add(res.getString("pseudo"));
                Lpass.add(res.getString("pass"));
                //obsolete            //Lrole.add(res.getString("role"));
                Lconsult.add(res.getBoolean("consult"));
                Lindex.add(res.getBoolean("indexation"));
                Lvalid.add(res.getBoolean("validation"));
                Ladmin.add(res.getBoolean("administ"));
            }
            res.close();
            stmt.close();
            conn.close();

        } catch (SQLException e) {
            e.printStackTrace();
        }
        int no = 0;
        while (no < Lpseudo.size()) {
            if ((Lpseudo.get(no).equals(nom)) && (Lpass.get(no).equals(mot))) {
                if ((Lconsult.get(no)) && (Lvalid.get(no)) && (Lindex.get(no))) {
                    pseudoField.setBackground(Color.green);
                    passField.setBackground(Color.green);
                    login = true; // login "normal"
                    bienvenueLabel.setForeground(Color.BLACK);
                    if (Ladmin.get(no)) {
                        // login admin
                        loginadmin = true;
                    }
                    actionJIF.setVisible(true);
                    actionJIF.setLocation(600, 10);
                }
                break;
            } else {
                no++;
            }
            login = false; //pas de login
            pseudoField.setBackground(Color.red);
            passField.setBackground(Color.red);
        }
}//GEN-LAST:event_loginA

    private void consultA(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_consultA
        //Bureau consulatations
        new CEHAFicheConsultation(this).setVisible(true);
    }//GEN-LAST:event_consultA

    private void adminA(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_adminA
        if (loginadmin) {
            adminJIF.setVisible(true);
        }
}//GEN-LAST:event_adminA

    private void creerficheA(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_creerficheA
        //Bureau création des fiches et administration
        new CEHAFicheCreation(this).setVisible(true);
    }//GEN-LAST:event_creerficheA

    private void controleValideA(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_controleValideA
        //        if (login) {
        //            JFrame frame = new JFrame("BDD CEHA Formulaire");
        //            CreationMasterDetailForm master = new CreationMasterDetailForm(this);
        //            master.getCommandes().setVisible(true);
        //            master.add(master.getCommandes());
        //            master.getAdminpanel().setVisible(flagadmin);
        //            master.getFormulaire().setVisible(true);
        //            frame.setContentPane(master);
        //            frame.pack();
        //            frame.setVisible(true);
        //
        //        } else {
        //            this.message = "Login nécessaire !";
        //            new OkDialog(this, true).setVisible(true);
        //        }
}//GEN-LAST:event_controleValideA

    private void choixRepA(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_choixRepA
        JFileChooser chooser = new JFileChooser();
        chooser.setCurrentDirectory(new java.io.File("."));
        chooser.setDialogTitle("choosertitle");
        chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        chooser.setAcceptAllFileFilterUsed(false);
        if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
            dossiersave1.setText(chooser.getCurrentDirectory().getAbsolutePath() + "\\");
        }
//            System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
//            System.out.println("getSelectedFile() : " + chooser.getSelectedFile());
}//GEN-LAST:event_choixRepA

    private void lancerButton1backupButton(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lancerButton1backupButton
        if (!nomsave1.getText().equals("")) {
            try {

                new BackupMysql(dossiersave1.getText() + nomsave1.getText() + ".zip");
            } catch (FileNotFoundException ex) {
                ex.printStackTrace();
            } catch (IOException ex) {
                ex.printStackTrace();
            } catch (Exception ex) {
                ex.printStackTrace();
            }

        }
}//GEN-LAST:event_lancerButton1backupButton

    private void droitsButton(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_droitsButton
        //        droitsUtilisateursJInternalFrame.setVisible(true);
}//GEN-LAST:event_droitsButton

    public static void main(String args[]) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                CEHAMain main = null;
                try {
                    main = new CEHAMain();
                } catch (IOException ex) {
                    ex.printStackTrace();
                } catch (SQLException ex) {
                    ex.printStackTrace();
                }
//                main.setSize(600, 300);
                main.setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField MysqlField;
    private javax.swing.JInternalFrame actionJIF;
    private javax.swing.JButton adminButton;
    private javax.swing.JInternalFrame adminJIF;
    private javax.swing.JLabel bienvenueLabel;
    private javax.swing.JCheckBox checkAuto;
    private javax.swing.JButton consultButton;
    private javax.swing.JPanel consultPanel;
    private javax.swing.JInternalFrame consultfichesJIF;
    private javax.swing.JButton controleValideButton;
    private javax.swing.JPanel createPanel1;
    private javax.swing.JButton creerficheButton;
    private javax.swing.JDesktopPane desktop;
    private javax.swing.JTextField dossiersave1;
    private javax.swing.JButton droitsButton;
    private javax.persistence.EntityManager entityManager;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JButton lancerButton1;
    private java.util.List<ceha.Fiche> list;
    private javax.swing.JButton loginButton;
    private javax.swing.JInternalFrame loginJIF;
    private javax.swing.JPanel loginPanel;
    private javax.swing.JLabel logoLabel;
    private javax.swing.JButton logoutButton;
    private javax.swing.JMenu mainmenu;
    private javax.swing.JMenuBar menubar1;
    private javax.swing.JTextField nomsave1;
    private javax.swing.JPanel optionsPanel;
    private javax.swing.JButton parcourirButton;
    private javax.swing.JPasswordField passAuto;
    private javax.swing.JPasswordField passField;
    private javax.swing.JLabel passLabel;
    private javax.swing.JTextField pseudoAuto;
    private javax.swing.JTextField pseudoField;
    private javax.swing.JLabel pseudoLabel;
    private javax.persistence.Query query;
    private javax.swing.JMenuItem quitte;
    private javax.swing.JTextField repvignette;
    // End of variables declaration//GEN-END:variables
}
